import { Injectable } from '@angular/core';
import {Observable} from 'rxjs/Rx';
import {DaAPI} from '../da-constants';
import {MsgResult} from '../../../models/msg-result';
import {RequestUtil} from '../../../util/request-util';

@Injectable()
export class DaVocsAuditService {

  constructor(
    private requestUtil: RequestUtil
  ) { }
  /**
   * 获取站点数据
   * @returns {Observable<MsgResult>}
   */
  getSiteData(): Observable<MsgResult> {
    const params = 'siteTypeCode=400' + '&monitorCode=' + "'VOCS'";
    return this.requestUtil.get(DaAPI.getSiteData, params);
  }
  /**
   * 获取设备数据
   * @returns {Observable<MsgResult>}
   */
  getDeviceData(siteCode): Observable<MsgResult> {
    const params = 'siteCode=' + siteCode;
    return this.requestUtil.get(DaAPI.getDeviceData, params);
  }
}
